<?php
    include_once '../findBasket.php';
    $basket = findBasket();
    
    $user_id = $basket->getUserId();
    $user = UserQuery::create()->findOneById($user_id);
    
    if(isset($_COOKIE['test'])){
        $val = $_COOKIE['test'];
        $val++;
        if(setcookie('test', $val)){
            $a=1;
        }
        else{
            $a=1;
        }
    }
    else {
        
        if(setcookie('test', 0)){
            $a=1;
        }
        else{
            $a=1;
        }
    }
    echo "Работа с куками".$val;
   
?>
